using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;

public partial class TestMail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        SmtpClient smtpClnt = new SmtpClient();

        smtpClnt.Host = "localhost";

        // smtpClnt.Credentials = Ncrendential;

        // Create a new blank MailMessage

        MailMessage email = new MailMessage();

        email.IsBodyHtml = true;

        email.From = new MailAddress("info@findadoc.com");

        email.To.Add("deepak.sihag@sampatti.com");

        email.Subject = "test";

        email.Body = "This is test message";

        smtpClnt.Send(email);

        Response.Write("Send Mail");

    }
}
